Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Yentl Opgeroverjip 20.Nov.03 04:42 PM a Web browser
Domino Designer 6.0.2 CF2 Windows XP


I've pulled a recommended script from Lotus Support to assist with reducing the number of replication/save conflicts. I modified it by adding a Messagebox to the code to let the users know what is going on. I'm still new to scripting, but thought it would be cool to have the messagebox display who has the current document open. Does anyone have any suggestions on how to make this work? I'm not sure what the script command is to pull the ID.

I tried some variations, but kept receiving errors. Here is the code in it's current fashion:

NOTE: My Unamea(1) string was an attempt to pull the information. It currently not being used.

Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New notessession
Dim db As notesdatabase
Dim item As notesitem
Dim array(1) As String
Dim Unamea(1) As String
Set db=session.currentdatabase

If source.isnewdoc=False Then
Set doc=source.document

If doc.hasitem("Field1") Then
Set item=doc.getfirstitem("field1")
array(0)=item.values(0)
If array(0)="Locked" Then
Messagebox "This document is currently being edited. Please try back later.",0,"Document In-Use"
continue=False
Delete doc
Else
continue=True
array(0)="Locked"
item.values=array(0)
docsaved=doc.save(False, False)
If Not docsaved Then
continue=False
Delete doc
End If
End If
End If
End If
End Sub

Thanks in advance for any feedback received!






Adding user id to messagebox (~Yentl Opgerove... 20.Nov.03)
. . RE: Adding user id to messagebox (~Mario Lopkiste... 20.Nov.03)
. . Sure. Pretty simple really. (~Dan Elhipister... 20.Nov.03)
. . . . RE: Sure. Pretty simple really. (~Yentl Opgerove... 20.Nov.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS